/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 64355
 * Date: 2022-08-09
 * Time: 21:49
 */
public class Student {
    public String name;
    public int age;
    public static String classes;
    public Student(){
        this("wangwu",99);
        System.out.println("不带参数的构造方法");
    }
    public Student(String name,int age){
        System.out.println("带两个参数的构造方法");
        this.name=name;
        this.age=age;
    }
    public void print(){
        System.out.println(this.name+"=>"+this.age+"=>"+classes);
    }

    public static void main(String[] args) {
        Student stu1=new Student("zhangsan",21);
        Student stu2=new Student("zhangsa",22);
        Student stu3=new Student("zhang",23);
        stu1.classes="105java";
        stu2.classes="106java";
        stu1.print();
        stu2.print();
        stu3.print();
    }
}
